package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.LeaveRetireUserMapper;
import com.ruoyi.system.domain.LeaveRetireUser;
import com.ruoyi.system.service.ILeaveRetireUserService;

/**
 * 离退人员Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-16
 */
@Service
public class LeaveRetireUserServiceImpl implements ILeaveRetireUserService 
{
    @Autowired
    private LeaveRetireUserMapper leaveRetireUserMapper;

    /**
     * 查询离退人员
     * 
     * @param userId 离退人员主键
     * @return 离退人员
     */
    @Override
    public LeaveRetireUser selectLeaveRetireUserByUserId(Long userId)
    {
        return leaveRetireUserMapper.selectLeaveRetireUserByUserId(userId);
    }

    /**
     * 查询离退人员列表
     * 
     * @param leaveRetireUser 离退人员
     * @return 离退人员
     */
    @Override
    public List<LeaveRetireUser> selectLeaveRetireUserList(LeaveRetireUser leaveRetireUser)
    {
        return leaveRetireUserMapper.selectLeaveRetireUserList(leaveRetireUser);
    }

    /**
     * 新增离退人员
     * 
     * @param leaveRetireUser 离退人员
     * @return 结果
     */
    @Override
    public int insertLeaveRetireUser(LeaveRetireUser leaveRetireUser)
    {
        return leaveRetireUserMapper.insertLeaveRetireUser(leaveRetireUser);
    }

    /**
     * 修改离退人员
     * 
     * @param leaveRetireUser 离退人员
     * @return 结果
     */
    @Override
    public int updateLeaveRetireUser(LeaveRetireUser leaveRetireUser)
    {
        return leaveRetireUserMapper.updateLeaveRetireUser(leaveRetireUser);
    }

    /**
     * 批量删除离退人员
     * 
     * @param userIds 需要删除的离退人员主键
     * @return 结果
     */
    @Override
    public int deleteLeaveRetireUserByUserIds(Long[] userIds)
    {
        return leaveRetireUserMapper.deleteLeaveRetireUserByUserIds(userIds);
    }

    /**
     * 删除离退人员信息
     * 
     * @param userId 离退人员主键
     * @return 结果
     */
    @Override
    public int deleteLeaveRetireUserByUserId(Long userId)
    {
        return leaveRetireUserMapper.deleteLeaveRetireUserByUserId(userId);
    }
}
